/*
 * Created by JFormDesigner on Sun Oct 19 23:59:57 CST 2025
 */

package com.yeban.javase.day10.swing_learn.other;

import java.awt.*;
import javax.swing.*;

/**
 * @author yeban
 */
public class MyImage extends JFrame {
    public MyImage() {
        initComponents();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        button1 = new JButton();

        //======== this ========
        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());

        //---- button1 ----
        button1.setText("text");
        button1.setIcon(new ImageIcon(getClass().getResource("/com/yeban/javase/day10/swing_learn/other/1.jpg")));
        contentPane.add(button1, BorderLayout.CENTER);
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JButton button1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
